//指针实现字符串比较
#include<iostream>
using namespace std;
#define N 100
int mystrcmp(char* s1, char* s2);
void transform(char*);
int main()
{
	char* s1, * s2;
	s1 = new char[N];
	s2 = new char[N];//尝试下这样分配内存空间
	cin >> s1;
	cin >> s2;//这样输入以空格结束
	transform(s1);//和cin.getline() 的输入以换行结束区分
	transform(s2);
	cout << mystrcmp(s1, s2) << endl;
	delete [] s1;
	delete [] s2;//记得释放内存
	return 0;
}
void transform(char* s)
{
	char* p = s;
	while (*p != 0)
	{
		if (*p >= 'a' && *p <= 'z')
			*p = *p + 'A' - 'a';
		p++;
	}
}
int  mystrcmp(char* s1, char* s2)
{
	char* p = s1, * q = s2;
	while (*p && *q && *p == *q)//找到第一个不相等的位置
	{
		++q;
		p++;
	}
	if (*p > * q)
		return 1;
	else if (*p < *q)
		return -1;
	else
		return 0;
}
